import request from '@/utils/request'
// 获取讲师列表
export function teacherList(data) {
  return request({
    url: '/course/teacher/list',
    method: 'post',
    data
  })
}
// 添加讲师
export function addTeacher(data, headers) {
  return request({
    url: '/course/teacher/addnew',
    method: 'post',
    data,
    headers
  })
}
// 修改讲师
export function updateTeacher(data, headers) {
  // return request({
  //     url:'/course/teacher/update',
  //     method:'post',
  //     data,
  //     headers
  // })
  return request.post('/course/teacher/update', data, { headers })
}
// 获取讲师信息
export function getTeacherById(id) {
  // return request({
  //     url:'/course/teacher/get',
  //     method:'get',
  //     params:{id}
  // })
  return request('/course/teacher/get', { params: { id }})
}
// 删除讲师
export function deleteTeacher(id, headers) {
  return request({
    url: '/course/teacher/delete',
    method: 'get',
    params: { id },
    headers
  })
}
